//
//  LoginView.m
//  艾听歌
//
//  Created by dllo on 16/6/4.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LoginView.h"

#define HHEIGHT self.frame.size.height
#define HWIDTH self.frame.size.width


@implementation LoginView


-(instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        [self doSomeThing];
    }
    
    return self;
}

-(void)doSomeThing{
    
    self.myLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, HWIDTH / 3 - 20, HHEIGHT)];
    self.myLabel.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.myLabel];
    
    
    self.myTextField = [[UITextField alloc]initWithFrame:CGRectMake(HWIDTH / 3, 0, HWIDTH / 3 * 2 - 30, HHEIGHT)];
    self.myTextField.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.myTextField];
    
    
    self.myTextField.layer.borderWidth = 1;
    self.myTextField.layer.borderColor = [[UIColor grayColor] CGColor];
    self.myTextField.layer.masksToBounds = YES;
    self.myTextField.layer.cornerRadius = 10;
    
}

@end
